package com.nanyang.tms.api.service.supplier;

import com.nanyang.common.core.domain.ApiResult;
import com.nanyang.common.core.page.PageBean;
import com.nanyang.tms.api.dto.request.supplier.SupplierAddRequest;
import com.nanyang.tms.api.dto.request.supplier.SupplierQueryRequest;
import com.nanyang.tms.api.dto.request.supplier.SupplierUpdateRequest;
import com.nanyang.tms.api.dto.request.supplier.SupplierUpdateStateRequest;
import com.nanyang.tms.api.dto.response.supplier.SupplierPageKeyResponse;
import com.nanyang.tms.api.dto.response.supplier.SupplierPageResponse;
import com.nanyang.tms.api.dto.response.supplier.SupplierResponse;

public interface SupplierRpcService {
    /**
     *
     * <p>listSupplier</p>
     * <p>Description:(查询服务商列表)</p>
     *
     * @param param
     * @return
     */
    ApiResult<PageBean<SupplierPageResponse>> listSupplier(SupplierQueryRequest param);

    /**
     * 模糊搜索
     * @param param
     * @return
     */
    ApiResult<PageBean<SupplierPageKeyResponse>> listSupplierByKey(SupplierQueryRequest param);
    /**
     *
     * <p>getSupplierById</p>
     * <p>Description:(根据code获取服务商详情)</p>
     *
     * @param code
     * @return
     */
    ApiResult<SupplierResponse> selectByCode(String code);

    /**
     *
     * <p>saveSupplier</p>
     * <p>Description:(保存服务商)</p>
     *
     * @param param
     * @return
     */
    ApiResult<Boolean> saveSupplier(SupplierAddRequest param);

    /**
     *
     * <p>updateSupplier</p>
     * <p>Description:(修改服务商)</p>
     *
     * @param param
     * @return
     */
    ApiResult<Boolean> updateSupplier(SupplierUpdateRequest param);

    /**
     *
     * <p>delSupplierById</p>
     * <p>Description:(根据code删除服务商)</p>
     *
     * @param supplierCode
     * @return
     */
    ApiResult<Boolean> delSupplier(String supplierCode,String pin);
    /**
     *
     * <p>updateSupplier</p>
     * <p>Description:(禁用)</p>
     *
     * @param param
     * @return
     */
    ApiResult<Boolean> disableState(SupplierUpdateStateRequest param);
    /**
     *
     * <p>updateSupplier</p>
     * <p>Description:(启用)</p>
     *
     * @param param
     * @return
     */
    ApiResult<Boolean> enableState(SupplierUpdateStateRequest param);
}
